var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('layout/main', { title: '瑞智农后台首页' });
});

/* 用户中心 */

router.get('/user', function(req, res, next){
    res.render('users/index', {title:'用户中心'});
});

router.get('/user/create', function(req, res, next){
    res.render('users/form', {title:'创建用户'});
});

router.get('/user/changepassword', function(req, res, next){
    res.render('users/form_change', {title:'修改用户密码'});
});

/* 分类管理 */

router.get('/cate', function(req, res, next){
    res.render('cate/index', {title:'分类中心'});
});

router.get('/cate/create', function(req, res, next){
    res.render('cate/form1', {title:'创建分类'});
});

router.get('/cate/update', function(req, res, next){
    res.render('cate/edit', {title:'编辑三级栏目'});
});

router.get('/cate/update2', function(req, res, next){
    res.render('cate/edit2', {title:'编辑二级栏目'});
});

/* 文章 */

router.get('/article', function(req, res, next){
    res.render('article/index', {title:'文章管理'});
});

router.get('/article/create', function(req, res, next){
    res.render('article/form', {title:'添加文章'});
});

/* 权限管理 */

router.get('/juris', function(req, res, next){
    res.render('juris/index', {title:'文章管理'});
});

router.get('/juris/create', function(req, res, next){
    res.render('juris/form', {title:'添加文章'});
});

/* 设备 */

router.get('/equi', function(req, res, next){
    console.log('aaa');
    res.render('equi/index', {title:'设备管理'});

});

router.get('/equi/create', function(req, res, next){
    res.render('equi/form', {title:'添加设备'});
});

router.get('/equi/group', function(req, res, next){
    res.render('equi/index_group', {title:'设备组列表'});
});


router.get('/equi/groupcreate', function(req, res, next){
    res.render('equi/form_group', {title:'添加设备组'});
});

/*菜单列表*/
router.get('/menus', function(req, res, next){
    res.render('menus/index', {title:'菜单列表'});
});


router.get('/menus/create', function(req, res, next){
    res.render('menus/form', {title:'创建菜单'});
});


/*北纬内容库*/

router.get('/library', function(req, res, next){
    res.render('library/index', {title:'北纬内容库列表'});
});

router.get('/library/category', function(req, res, next){
    res.render('library/category', {title:'分类列表'});
});

router.get('/library/create', function(req, res, next){
    res.render('library/form', {title:'添加北纬内容库内容'});
});

/*留言箱*/

router.get('/review', function(req, res, next){
    res.render('review/form1', {title:'我要贷款'});
});

router.get('/review2', function(req, res, next){
    res.render('review/form2', {title:'项目对接'});
});


/*app微信*/


router.get('/weixin', function(req, res, next){
    res.render('weixin/index', {title:'app微信'});
});


router.get('/tuiguang', function(req, res, next){
    res.render('weixin/index2', {title:'待机广告推广'});
});


router.get('/tuiguang/create', function(req, res, next){
    res.render('weixin/form', {title:'添加广告'});
});


/*Statistics*/

router.get('/statistics/', function(req, res, next){
    res.render('statistics/index', {title:'文章阅读数统计'});
});

router.get('/statistics/category', function(req, res, next){
    res.render('statistics/category', {title:'栏目点击量统计'});
});

/*advertisement*/

router.get('/advertisement', function(req, res, next){
    res.render('advertisement/index', {title:'广告管理'});
});

router.get('/advertisement/img', function(req, res, next){
    res.render('advertisement/img', {title:'上传图片'});
});

router.get('/advertisement/video', function(req, res, next){
    res.render('advertisement/video', {title:'上传视频'});
});

router.get('/advertisement/group', function(req, res, next){
    res.render('advertisement/group', {title:'广告组列表'});
});

router.get('/advertisement/group/create', function(req, res, next){
    res.render('advertisement/create_group', {title:'添加广告组'});
});

//播放视频

router.get('/video', function(req, res, next){
    res.render('video/index', {title:'播放视频',layout:'colum2'});
});


module.exports = router;
